package com.weichuang.test;

import com.weichuang.service.UserService;
import com.weichuang.service.impl.UserServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//模拟真实的和前端交互的controller
public class UserController {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext
                = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.save();
        /*UserService userService = new UserServiceImpl();
        userService.save();*/
    }
}
